<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      p {
        height: 200px;
        background-color: antiquewhite;
        font-size: 3rem;
      }
    </style>
  </head>
  <body style="overflow: hidden">
    <p>hello p1</p>
    <p>hello p2</p>
    <p>hello p3</p>
    <p>hello p4</p>
    <p id="p5">hello p5</p>
    <p>hello p6</p>
    <p>hello p7</p>
    <p>hello p8</p>
    <script>
      const p5 = document.getElementById("p5");
      setInterval(() => {
        // p5.scrollIntoView(true);
        p5.scrollIntoView(false);
      }, 5000);
    </script>
  </body>
</html>
